#!/usr/bin/env python
# -*- coding: utf-8 -*-
# datetime: 30/10/2023 下午11:30
# Author: name
# File: UserModel.py
# ide: PyCharm
# description:
from pydantic import BaseModel
from tortoise.models import Model
from tortoise import fields


# 定义模型
class UserModel(Model):
    id = fields.IntField(pk=True)
    username = fields.CharField(max_length=255, unique=True)
    password = fields.CharField(max_length=255)
    email = fields.CharField(max_length=255)

    class Meta:
        table = "users"

class User(BaseModel):
    pass
